package com.yanqu.road.server.cmd.union.cross.trade;

import com.yanqu.road.pb.union.UnionTradeProto;
import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.manager.union.trade.CrossUnionTradeMgr;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.Protocol;

@Cmd(code = Protocol.C_UNION_TRADE_ROUTE_UNREAD_EVENT_LIST, desc = "未读事件")
public class CrossUnReadEventListCmd extends CrossCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {

        UnionTradeProto.TradeLogDataListReqMsg reqMsg = UnionTradeProto.TradeLogDataListReqMsg.parseFrom(packet.getBytes());
        int routeId = reqMsg.getRouteId();

        CrossUnionTradeMgr.syncUnReadEventList(serverId, packet.getPlayerId(), routeId);

    }

    @Override
    public void sendData() {

    }
}
